<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>更改题目页面</title>
</head>
<body>

<#if type == 1>
<form action="/teacher/question/update/1">
    <h1>单项选择题</h1>
    <input type="hidden" name="id" value="${id}">
    题目：<input type="text" name="question" value="${question.sgQuestion}" required>
    选项 A：<input type="text" name="A" value="${question.choiceA}" required>
    选项 B：<input type="text" name="B" value="${question.choiceB}" required>
    选项 C：<input type="text" name="C" value="${question.choiceC}" required>
    选项 D：<input type="text" name="D" value="${question.choiceD}" required>
    答案 :
    <input type="radio" name="answer" <#if question.answer == "A"> checked="checked"</#if> value="A"> A
    <input type="radio" name="answer" <#if question.answer == "B"> checked="checked"</#if> value="B"> B
    <input type="radio" name="answer" <#if question.answer == "C"> checked="checked"</#if> value="C"> C
    <input type="radio" name="answer" <#if question.answer == "D"> checked="checked"</#if> value="D"> D
    分数 :<input type="number" value=${question.score} name="score">
    难度 :<input type="number" value=${question.difficult} name="difficult">
    <input type="submit" value="提交">

</form>
<#elseif type == 2>
<form action="/teacher/question/update/2">
    <h1>多项选择题</h1>
    <input type="hidden" name="id" value="${id}">
    题目：<input type="text" name="question" value="${question.plQuestion}" required>
    选项 A：<input type="text" name="A" value="${question.choiceA}" required>
    选项 B：<input type="text" name="B" value="${question.choiceB}" required>
    选项 C：<input type="text" name="C" value="${question.choiceC}" required>
    选项 D：<input type="text" name="D" value="${question.choiceD}" required>
    答案 :
    <input type="checkbox" name="answer" <#if A??> checked="checked" </#if> value="A"> A
    <input type="checkbox" name="answer" <#if B??> checked="checked" </#if> value="B"> B
    <input type="checkbox" name="answer" <#if C??> checked="checked" </#if> value="C"> C
    <input type="checkbox" name="answer" <#if D??> checked="checked" </#if> value="D"> D
    分数 :<input type="number" value=${question.score} name="score">
    难度 :<input type="number" value=${question.difficult} name="difficult">
    <input type="submit" value="提交">
</form>
<#elseif type == 3>
<form action="/teacher/question/update/3">
    <h1>文本题</h1>
    <input type="hidden" name="id" value="${id}">
    题目 : <input type="text" name="question" value="${question.tofQuestion}" required>
    答案 : <input type="text" name="answer" value="${question.answer}" required>
    分数 : <input type="number" value=${question.score} name="score">
    难度 : <input type="number" value=${question.difficult} name="difficult">
    <input type="submit" value="提交">
</form>
<#elseif type == 4>
<form action="/teacher/question/update/4">
    <h1>填空选择题</h1>
    题目 : <input type="text" name="question" value="${question.fillQuestion} required>
    答案 : <input type="text" name="answer" value="${question.answer}" required>
    分数 : <input type="number" value=${question.score} name="score">
    难度 : <input type="number" value=${question.difficult} name="difficult">
    <input type="submit" value="提交">
</form>
<#elseif type == 5>
<form action="/teacher/question/update/5">
    <h1>填空选择题</h1>
    题目 : <input type="text" name="question" value="${question.essayQuestion} required>
    答案 : <input type="text" name="answer" value="${question.answer}" required>
    分数 : <input type="number" value=${question.score} name="score">
    难度 : <input type="number" value=${question.difficult} name="difficult">
    <input type="submit" value="提交">
</form>
<#else>
    <h1>未能找到该题目</h1>
</#if>
</body>
</html>